{extend name="base"}
{block name="title"}注册用户{/block}
{block name="head"}
<style>
  .border-table tbody th{text-align:center; color:#333; font-weight:400; padding-left:5px;}
  .border-table{font-size:12px; color:#666;}
  .border-table th, .border-table td{text-align:center; padding:0 4px;}
</style>
<script>
$(function() {
  $('table.ltable td:nth-child(8) a.input').click(function () {
    var val = $(this).parent().attr('title');
    console.log("同登陆IP", val);
    $('select[name=same]').val(1);
    $('input[name=search]').val(val);
    $('form').submit();
  });
  $('table.ltable td:nth-child(9) a.input').click(function () {
    var val = $(this).parent().attr('title');
    console.log("同注册IP", val);
    $('select[name=same]').val(2);
    $('input[name=search]').val(val);
    $('form').submit();
  });
  $('table.ltable td:nth-child(10) a.input').click(function () {
    var val = $(this).parent().attr('title');
    console.log("同机器", val);
    $('select[name=same]').val(3);
    $('input[name=search]').val(val);
    $('form').submit();
  });
});
</script>
{/block}
{block name="body"}
<body class="mainbody">
<form>
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
  <a href="{:url('index/home')}" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
  <i class="arrow iconfont icon-arrow-right"></i>
  <span>注册用户</span>
</div>
<!--/导航栏-->

<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"><i class="iconfont icon-more"></i></a>
      <div class="l-list">
        <div class="menu-list">
          <div class="rule-single-select">
            <select name="channel" style="display:none">
              <option value="-1">===所有渠道===</option>
              {volist name="CHANNELS" id="val"}
              <option value="{$key}"{eq name="channel" value="$key"} selected{/eq}>[{$key}]{$val.Name}</option>
              {/volist}
            </select>
          </div>
          <input type="text" class="input rule-date-input" id="time1" autocomplete="off" {literal}onclick="WdatePicker({maxDate:'#F{$dp.$D(\'time2\')}'})"{/literal} name="time1" value="{$time1|default=''|substr=0,10}" /> -
          <input type="text" class="input rule-date-input" id="time2" autocomplete="off" {literal}onclick="WdatePicker({minDate:'#F{$dp.$D(\'time1\')}', maxDate:'%y-%M-%d'})"{/literal} name="time2" value="{$time2|default=''|substr=0,10}" />
          <div class="rule-single-select">
            <select name="sex" style="display:none">
              <option value="-1">性别</option>
              <option value="1"{eq name="sex" value="1"} selected{/eq}>男性</option>
              <option value="2"{eq name="sex" value="2"} selected{/eq}>女性</option>
            </select>
          </div>
          <div class="rule-single-select">
            <select name="at" style="display:none">
              <option value="-1">==账号类型==</option>
              {volist name="ACCOUNTS_TYPE" id="v"}
              <option value="{$key}"{eq name="at" value="$key"} selected{/eq}>[{$key}]{$v}</option>
              {/volist}
            </select>
          </div>
          <div class="rule-single-select">
            <select name="same" style="display:none">
              <option value="0"> ---- </option>
              <option value="1"{eq name="same" value="1"} selected{/eq}>同登录IP</option>
              <option value="2"{eq name="same" value="2"} selected{/eq}>同注册IP</option>
              <option value="3"{eq name="same" value="3"} selected{/eq}>同登录机器</option>
            </select>
          </div>
          <input type="text" class="keyword" autocomplete="off" name="search" value="{$search|default=''|htmlentities}" placeholder="UserID/GameID/昵称" />
          <a class="btn-search"><i class="iconfont icon-search"></i></a>
        </div>
      </div>
      <div class="r-list">
        <label style="color:#f00;">合计房卡：{:number_format($info.RoomCard)}</label>
      </div>
    </div>
  </div>
</div>
<!--/工具栏-->

<!--列表-->
<div class="table-container">
<table class="border-table ltable">
  <tr>
    <th>渠道</th>
    <th>用户头像/昵称/注册时间</th>
    <th>用户标识</th>
    <th>游戏标识</th>
    <th>合计房卡</th>
    <th>同登陆IP</th>
    <th>同注册IP</th>
    <th>同机器</th>
    <th>状态</th>
  </tr>
{empty name="list"}
  <tr><td colspan="10">Oh~暂无数据!</td></tr>
{else/}
  {volist name="list" id="v"}
  <tr data-GameID="{$v.GameID}">
    <td>[{$v.Channel}]{$CHANNELS[$v.Channel]['Name'] ?? '--'}</td>
    <td class="user-avatar" title="
游戏帐号：{$v.Accounts}&#13
真实姓名：{$v.Compellation}&#13
身份证号：{$v.PassPortID}&#13
手机号码：{$v.RegisterMobile}&#13
    性别：{switch name='$v.Sex'}{case value='0'}未知{/case}{case value='1'}男性{/case}{case value='2'}女性{/case}{/switch}&#13
注册时间：{$v.RegisterDate}&#13
注册地址：{$v.RegisterIP}&#13;
登录次数：{$v.GameLogonCount} 次&#13
最后登录时间：{$v.LastLogonDate}&#13
最后登录地址：{$v.LastLogonIP}&#13
">
      <a target="_blank" href="{:url('user.detail/index')}?UserID={$v.UserID}">
        <img src="{$v.AccountImgUrl?:'__STATIC__/houtai/images/dface.png'}" />
      </a>
      <div class="user-box">
        <h4><a target="_blank" class="at_{$v.AccountsType}" href="{:url('user.detail/index')}?UserID={$v.UserID}">{:htmlentities($v.NickName)}</a></h4>
        <i>{$v.RegisterDate}</i>
      </div>
    </td>
    <td>{$v.UserID}</td>
    <td>{$v.GameID}</td>
    <td>{$v.RoomCard}</td>
    <td title="{$v.LastLogonIP}"><a href="{:url('index')}?same=1&search={$v.LastLogonIP}">{$v.LastLogonIPCount}个</a></td>
    <td title="{$v.RegisterIP}"><a href="{:url('index')}?same=2&search={$v.RegisterIP}">{$v.RegisterIPCount}个</a></td>
    <td title="{$v.LastLogonMachine}"><a href="{:url('index')}?same=3&search={$v.LastLogonMachine}">{$v.LastLogonMachineCount}个</a></td>
    <td style="color:{eq name='v.Nullity' value='0'}green{else/}red{/eq}">{eq name="v.Nullity" value="0"}正常{else/}禁用{/eq}</td>
  </tr>
  {/volist}
{/empty}
</table>
</div>
<!--/列表-->

<!--内容底部-->
<div class="page-footer"><div class="btn-wrap">{$list->render()}</div></div>
<!--/内容底部-->

</form>
</body>
{/block}